const express = require('express')
const router = express.Router()
const {testHandler} = require('../router_handler/index')
const expressJoi = require('@escook/express-joi')
const {publishTest,getTestDetail,submitTest,resubmitTest,giveScore} = require('../auth/test')
router.post('/publishTest',expressJoi(publishTest),testHandler.publishTest)
router.get('/getTestList',testHandler.getTestList)
router.delete('/deleteTest/:id',testHandler.deleteTest)
router.get('/getTestDetailList',expressJoi(getTestDetail),testHandler.getTestDetailList)
router.post('/submitTest',expressJoi(submitTest),testHandler.submitTest)
router.post('/resubmitTest',expressJoi(resubmitTest),testHandler.resubmitTest)
router.get('/admin/getCheckTest/:id',testHandler.getCheckTest)
router.post('/admin/giveScore',expressJoi(giveScore),testHandler.giveScore)
module.exports = router